# Copyright 2023 The Dawn & Tint Authors
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
#    list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
#    this list of conditions and the following disclaimer in the documentation
#    and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
#    contributors may be used to endorse or promote products derived from
#    this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

################################################################################
# File generated by 'tools/src/cmd/gen' using the template:
#   tools/src/cmd/gen/build/BUILD.bazel.tmpl
#
# To regenerate run: './tools/run gen'
#
#                       Do not modify this file directly
################################################################################

load("//src/tint:flags.bzl", "COPTS")
load("@bazel_skylib//lib:selects.bzl", "selects")
cc_binary(
  name = "test_cmd",
  srcs = [
    "main_test.cc",
  ],
  deps = [
    "//src/tint/api",
    "//src/tint/api/common:test",
    "//src/tint/lang/core/constant:test",
    "//src/tint/lang/core/intrinsic:test",
    "//src/tint/lang/core/ir/analysis:test",
    "//src/tint/lang/core/ir/transform:test",
    "//src/tint/lang/core/ir:test",
    "//src/tint/lang/core/type:test",
    "//src/tint/lang/core:test",
    "//src/tint/lang/glsl/ir:test",
    "//src/tint/lang/hlsl/ir:test",
    "//src/tint/lang/hlsl/type:test",
    "//src/tint/lang/hlsl/writer/common:test",
    "//src/tint/lang/hlsl/writer/raise:test",
    "//src/tint/lang/msl/ir:test",
    "//src/tint/lang/msl/type:test",
    "//src/tint/lang/spirv/ir:test",
    "//src/tint/lang/spirv/reader/lower:test",
    "//src/tint/lang/spirv/type:test",
    "//src/tint/lang/wgsl/ast:test",
    "//src/tint/lang/wgsl/common:test",
    "//src/tint/lang/wgsl/helpers:test",
    "//src/tint/lang/wgsl/intrinsic:test",
    "//src/tint/lang/wgsl/program:test",
    "//src/tint/lang/wgsl/reader/lower:test",
    "//src/tint/lang/wgsl/resolver:test",
    "//src/tint/lang/wgsl/sem:test",
    "//src/tint/lang/wgsl/writer/ir_to_program:test",
    "//src/tint/lang/wgsl/writer/raise:test",
    "//src/tint/lang/wgsl:test",
    "//src/tint/utils/bytes:test",
    "//src/tint/utils/command:test",
    "//src/tint/utils/containers:test",
    "//src/tint/utils/diagnostic:test",
    "//src/tint/utils/file:test",
    "//src/tint/utils/ice:test",
    "//src/tint/utils/macros:test",
    "//src/tint/utils/math:test",
    "//src/tint/utils/memory:test",
    "//src/tint/utils/result:test",
    "//src/tint/utils/rtti:test",
    "//src/tint/utils/strconv:test",
    "//src/tint/utils/symbol:test",
    "//src/tint/utils/text:test",
    "//src/tint/utils:test",
    "@gtest",
  ] + select({
    ":tint_build_glsl_writer": [
      "//src/tint/lang/glsl/writer/common:test",
      "//src/tint/lang/glsl/writer/raise:test",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_glsl_writer_and_tint_build_glsl_validator": [
      "//src/tint/lang/glsl/writer:test",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_hlsl_writer": [
      "//src/tint/lang/hlsl/writer/ast_printer:test",
      "//src/tint/lang/hlsl/writer:test",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_hlsl_writer_and_tint_build_wgsl_reader_and_tint_build_wgsl_writer": [
      "//src/tint/lang/hlsl/writer/ast_raise:test",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_ir_binary": [
      "//src/tint/lang/core/ir/binary:test",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_msl_writer": [
      "//src/tint/lang/msl/writer/ast_printer:test",
      "//src/tint/lang/msl/writer/common:test",
      "//src/tint/lang/msl/writer/raise:test",
      "//src/tint/lang/msl/writer:test",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_msl_writer_and_tint_build_wgsl_reader_and_tint_build_wgsl_writer": [
      "//src/tint/lang/msl/writer/ast_raise:test",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_spv_reader": [
      "//src/tint/lang/spirv/reader/common:test",
      "//src/tint/lang/spirv/reader/parser:test",
      "//src/tint/lang/spirv/reader:test",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_spv_reader_and_tint_build_wgsl_reader_and_tint_build_wgsl_writer": [
      "//src/tint/lang/spirv/reader/ast_lower:test",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_spv_reader_and_tint_build_wgsl_writer": [
      "//src/tint/lang/spirv/reader/ast_parser:test",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_spv_reader_or_tint_build_spv_writer": [
      "//src/tint/lang/spirv/validate:test",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_spv_writer": [
      "//src/tint/lang/spirv/writer/common:test",
      "//src/tint/lang/spirv/writer/raise:test",
      "//src/tint/lang/spirv/writer:test",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_tintd_and_tint_build_wgsl_reader": [
      "//src/tint/lang/wgsl/ls:test",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_wgsl_reader": [
      "//src/tint/lang/wgsl/inspector:test",
      "//src/tint/lang/wgsl/reader/parser:test",
      "//src/tint/lang/wgsl/reader/program_to_ir:test",
      "//src/tint/lang/wgsl/reader:test",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_wgsl_reader_and_tint_build_wgsl_writer": [
      "//src/tint/lang/wgsl/ast/transform:test",
    ],
    "//conditions:default": [],
  }) + select({
    ":tint_build_wgsl_writer": [
      "//src/tint/lang/wgsl/writer/ast_printer:test",
      "//src/tint/lang/wgsl/writer:test",
    ],
    "//conditions:default": [],
  }),
  copts = COPTS,
  visibility = ["//visibility:public"],
)

alias(
  name = "tint_build_glsl_validator",
  actual = "//src/tint:tint_build_glsl_validator_true",
)

alias(
  name = "tint_build_glsl_writer",
  actual = "//src/tint:tint_build_glsl_writer_true",
)

alias(
  name = "tint_build_hlsl_writer",
  actual = "//src/tint:tint_build_hlsl_writer_true",
)

alias(
  name = "tint_build_ir_binary",
  actual = "//src/tint:tint_build_ir_binary_true",
)

alias(
  name = "tint_build_msl_writer",
  actual = "//src/tint:tint_build_msl_writer_true",
)

alias(
  name = "tint_build_spv_reader",
  actual = "//src/tint:tint_build_spv_reader_true",
)

alias(
  name = "tint_build_spv_writer",
  actual = "//src/tint:tint_build_spv_writer_true",
)

alias(
  name = "tint_build_tintd",
  actual = "//src/tint:tint_build_tintd_true",
)

alias(
  name = "tint_build_wgsl_reader",
  actual = "//src/tint:tint_build_wgsl_reader_true",
)

alias(
  name = "tint_build_wgsl_writer",
  actual = "//src/tint:tint_build_wgsl_writer_true",
)

selects.config_setting_group(
    name = "tint_build_spv_reader_or_tint_build_spv_writer",
    match_any = [
        "tint_build_spv_reader",
        "tint_build_spv_writer",
    ],
)

selects.config_setting_group(
    name = "tint_build_glsl_writer_and_tint_build_glsl_validator",
    match_all = [
        ":tint_build_glsl_writer",
        ":tint_build_glsl_validator",
    ],
)
selects.config_setting_group(
    name = "tint_build_hlsl_writer_and_tint_build_wgsl_reader_and_tint_build_wgsl_writer",
    match_all = [
        ":tint_build_hlsl_writer",
        ":tint_build_wgsl_reader",
        ":tint_build_wgsl_writer",
    ],
)
selects.config_setting_group(
    name = "tint_build_msl_writer_and_tint_build_wgsl_reader_and_tint_build_wgsl_writer",
    match_all = [
        ":tint_build_msl_writer",
        ":tint_build_wgsl_reader",
        ":tint_build_wgsl_writer",
    ],
)
selects.config_setting_group(
    name = "tint_build_spv_reader_and_tint_build_wgsl_reader_and_tint_build_wgsl_writer",
    match_all = [
        ":tint_build_spv_reader",
        ":tint_build_wgsl_reader",
        ":tint_build_wgsl_writer",
    ],
)
selects.config_setting_group(
    name = "tint_build_spv_reader_and_tint_build_wgsl_writer",
    match_all = [
        ":tint_build_spv_reader",
        ":tint_build_wgsl_writer",
    ],
)
selects.config_setting_group(
    name = "tint_build_tintd_and_tint_build_wgsl_reader",
    match_all = [
        ":tint_build_tintd",
        ":tint_build_wgsl_reader",
    ],
)
selects.config_setting_group(
    name = "tint_build_wgsl_reader_and_tint_build_wgsl_writer",
    match_all = [
        ":tint_build_wgsl_reader",
        ":tint_build_wgsl_writer",
    ],
)

